#pragma once

#ifndef __SWIG__
#include <D3dx9math.h>
#include <d2d1helper.h>
#else
#include "msTypes.i"
#include "D3DX10Math_swig.h"
#include "ID2D_swig.h"
#endif


class CDX3DTransform 
{
protected:
	ID3DXMatrixStack* m_pMatrixStack;
public:
	CDX3DTransform();
	virtual ~CDX3DTransform();
	virtual D3DXMATRIX GetTransform(); 
	virtual HRESULT SetTransform(const D3DXMATRIX* mat);
	virtual HRESULT Translate(float x, float y, float z);
	virtual HRESULT TranslateLocal(float x, float y, float z);
	virtual HRESULT RotateAxis(const D3DXVECTOR3* pV, FLOAT angle);
	virtual HRESULT RotateAxisLocal(const D3DXVECTOR3* pV, FLOAT angle);
	virtual HRESULT Scale(float sx, float sy, float sz);
	virtual HRESULT ScaleLocal(float sx, float sy, float sz);
	virtual HRESULT MultMatrix(const D3DXMATRIX* pMat);
	virtual HRESULT MultMatrixLocal(const D3DXMATRIX* pMat);
	virtual HRESULT LoadIdentity();
	virtual HRESULT PushMatrix();
	virtual HRESULT PopMatrix();
	virtual D2D1::Matrix3x2F GetTransform2D();

	virtual HRESULT Transform3DPoint(D3DXVECTOR3& outVec, const D3DXVECTOR3& inVec);
	virtual HRESULT Transform3DPoints(D3DXVECTOR3* outVec, const D3DXVECTOR3* inVec, UINT nPoints);
	virtual HRESULT InvTransform3DPoint(D3DXVECTOR3& outVec, const D3DXVECTOR3& inVec);
	virtual HRESULT InvTransform3DPoints(D3DXVECTOR3* outVec, const D3DXVECTOR3* inVec, UINT nPoints);
};

